<template>
  <div id="app">
    <ul>
      <li v-for="item in arr" :key="item">
        {{ item }}
      </li>
    </ul>
    <button @click="add">走一走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ['帅哥', '美女', '程序猿'],
      str: ''
    }
  },
  methods: {
    add() {
      this.str = this.arr.push(this.arr.shift())
      console.log(this.str)
      // this.arr = this.str.shift()
    }
  }
}
</script>

<style></style>
